package com.zhb.cloud.service.impl;

import java.util.Date;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.zhb.cloud.mapper.UserAwardMapper;
import com.zhb.cloud.model.UserAward;
import com.zhb.cloud.service.UserAwardService;

@Service
@Transactional
public class UserAwardServiceImpl implements UserAwardService {
	@Autowired
	private UserAwardMapper userAwardMapper;

	@Override
	public void recordUserAward(Integer userId, Integer prizeId) {
		UserAward record = new UserAward();
		record.setCreateTime(new Date());
		record.setUserId(userId);
		record.setPrizeId(prizeId);
		userAwardMapper.insert(record);
	}

}
